package com.lonely.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lonely.common.core.domain.StatusInfo;
import com.lonely.purchase.domain.dto.materialpurchase.QueryMaterialPurchasePageDTO;
import com.lonely.purchase.domain.entity.SysMaterialPurchase;
import com.lonely.purchase.domain.vo.materialpurchase.QueryMaterialPurchasePageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/7/18 17:46
 * @description: 订单物料采购mapper
 */
public interface SysMaterialPurchaseMapper extends BaseMapper<SysMaterialPurchase> {

    /**
     * 物料采购分页查询
     *
     * @param page
     * @param queryDto
     * @return
     */
    Page<QueryMaterialPurchasePageVO> page(Page<QueryMaterialPurchasePageVO> page, @Param("query") QueryMaterialPurchasePageDTO queryDto);

    /**
     * 根据供应商名称片段查询采购供应商集合
     *
     * @param supplierName
     * @return
     */
    List<String> getPurchaseSupplierSelects(@Param("supplierName") String supplierName);

    /**
     * 获取采购状态统计
     *
     * @param queryDto
     * @return
     */
    List<StatusInfo> getStatusTotals(@Param("query") QueryMaterialPurchasePageDTO queryDto);
}
